﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Framework;
using CodeFirstDomain.Events;

namespace CodeFirstDomain.Model
{
    public class MBlog : DbEntity, IAggregateRoot
    {
        public Guid ID
        {
            get;set;
        }

        public EnableStatus Status
        {
            get;set;
        }

        public string Body
        {
            get;set;
        }

        public DateTime CreateTime
        {
            get;set;
        }

        //public virtual User Author
        //{
        //    get;set;
        //}

        internal void Added()
        {
            this.PostEvent(new MBlogAddedEvent {
                MBlogID = this.ID,
                CreateTime = this.CreateTime
            });
        }
    }
}
